using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Collections.Generic;

using Microsoft.ConnectionEngine.Samples.Adapters;
using Microsoft.ConnectionEngine.Common;
using Microsoft.ConnectionEngine.Registers.Core.ServiceProvider.Common;

[WebService(Namespace = "http://Microsoft.ConnectionEngine.Services")]
public class SystemAdapter : System.Web.Services.WebService
{
    private static SystemAdapterSample systemAdapterInstance;

    public SystemAdapterSample SystemAdapterInstance
    {
        get
        {
            if (systemAdapterInstance == null)
                systemAdapterInstance = new SystemAdapterSample();
            return systemAdapterInstance;
        }
    }

    public SystemAdapter()
    {

    }

    [WebMethod]
    public ConnectionEngineMessage SendConnectionEngineMessage(object objMessage, int msgType, Guid conversationID, string destinationID)
    {
        ConnectionEngineMessage result = SystemAdapterInstance.SendConnectionEngineMessage(objMessage, msgType, conversationID, destinationID);
        return result;
    }

    [WebMethod]
    public ConnectionEngineMessage ReceiveConnectionEngineMessage(ConnectionEngineMessage connectionEngineMessageRequest)
    {
        ConnectionEngineMessage result = SystemAdapterInstance.ReceiveConnectionEngineMessage(connectionEngineMessageRequest);
        return result;
    }

    [WebMethod]
    public string GetInteractiveSessionInformation(string serviceproviderid, int messagetypeid, List<KeyValueItem> args)
    {
        string result = SystemAdapterInstance.GetInteractiveSessionInformation(serviceproviderid, messagetypeid, args);
        return result;
    }
				
}
